import request from '@/utils/request'

export function addClass(params) {
  return request({
    method: 'post',
    url: 'class/add',
    data: params
  })
}

export function getClassList(params) {
  return request({
    method: 'get',
    url: 'class/list',
    params
  })
}

export function getClassStudents(params) {
  return request({
    method: 'get',
    url: 'class/students',
    params
  })
}

export function getClassListOptions(params) {
  return request({
    method: 'get',
    url: 'class/listOptions',
    params
  })
}

export function getClassDetail(params) {
  return request({
    method: 'get',
    url: 'class/detail',
    params
  })
}

export function delayClassSchedule(params) {
  return request({
    method: 'get',
    url: 'class/delayClassSchedule',
    params
  })
}

export function quitClass(params) {
  return request({
    method: 'post',
    url: 'class/quit',
    params
  })
}

export function endClass(params) {
  return request({
    method: 'get',
    url: 'class/endClass',
    params
  })
}

export function getClassSchedule(params) {
  return request({
    method: 'get',
    url: 'class/schedules',
    params
  })
}

export function updateClassSchedule(params) {
  return request({
    method: 'post',
    url: 'class/updateClassSchedule',
    data: params
  })
}

export function applySchedule(params) {
  return request({
    method: 'post',
    url: 'class/applySchedule',
    data: params
  })
}

export function scheduleCallRoll(params) {
  return request({
    method: 'get',
    url: 'class/scheduleCallRoll',
    params
  })
}

// 根据课表点名
export function feedback(id, params) {
  return request({
    method: 'post',
    url: `class/feedback/${id}`,
    data: params
  })
}
